function request(url, method, fn, data) {
    $.ajax({
        url: url,
        data: data,
        method: method,
        dataType: "json",
        success: fn
    })
}